import React from "react";
import store from "../../store/wwj/index";
import index1 from "../../assets/lh/index.module.css";
import { GET_SINGERS } from "../../api/lh/index";
class GetSingers extends React.Component {
    constructor() {
        super();
        this.state = {
            singers: [
                {
                    singer: "华语男",
                    cat: 1001
                },
                {
                    singer: "华语女",
                    cat: 1002
                },
                {
                    singer: "华语组合",
                    cat: 1003
                },
                {
                    singer: "欧美男",
                    cat: 2001
                },
                {
                    singer: "欧美女",
                    cat: 2002
                },
                {
                    singer: "欧美组合",
                    cat: 2003
                },
                {
                    singer: "日本男",
                    cat: 6001
                },
                {
                    singer: "日本女",
                    cat: 6002
                },
                {
                    singer: "日本组合",
                    cat: 6003
                },
                {
                    singer: "韩国男",
                    cat: 7001
                },
                {
                    singer: "韩国女",
                    cat: 7002
                },
                {
                    singer: "韩国组合",
                    cat: 7003
                },
                {
                    singer: "其他男歌手",
                    cat: 4001
                },
                {
                    singer: "其他女歌手",
                    cat: 4002
                },
                {
                    singer: "其他组合",
                    cat: 4003
                }
            ]
        };
    }
    getSinger(cat) {
        store.dispatch(GET_SINGERS(cat));
        store.getState().getwords = [];
        store.getState().getremensinger = [];
        this.props.Getcat(cat);
    }
    render() {
        return (
            <div className={index1.singertop1}>
                <div className={index1.li1}>分类(默认热门):</div>
                <ul className={index1.ul}>
                    {this.state.singers.map((item, index) => (
                        <li
                            key={index}
                            className={index1.li2}
                            onClick={this.getSinger.bind(this, item.cat)}
                        >
                            <span> {item.singer}</span>
                        </li>
                    ))}
                </ul>
            </div>
        );
    }
}
export default GetSingers;
